package com.taxsearch.config;

import com.taxsearch.commons.TokenInterceptor;
import com.taxsearch.util.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @program: 旅馆app
 * @description: 注册拦截器，添加拦截例外
 * @author: Bruse Queen
 * @create: 2019-01-17 15:21
 **/
@Configuration
public class SessionConfiguration extends WebMvcConfigurerAdapter
{
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenInterceptor()).addPathPatterns("/*/**")
                .excludePathPatterns("/HotelAndroid/getToken.do").excludePathPatterns("/HotelAndroid/login.do");
    }
}

